<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title></title>
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/api.css"/>
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/order-new.css?v=1"/>
    <link rel="stylesheet" type="text/css" href="{php echo $this->cur_mobile_path}/css/fakeLoader.css">
    <script src="{php echo $this->cur_mobile_path}/script/jquery-1.8.3.min.js"></script>
    <link rel="stylesheet" href="{php echo $this->cur_mobile_path}/mvalidate/validate.css" />
    <script type="text/javascript" src="{php echo $this->cur_mobile_path}/mvalidate/jquery-mvalidate.js" ></script>
</head>
<body>
<script type="text/html" id="distance-form-html">
    {php include $this->template($this->cur_tpl . '/_admingoods_options');}
</script>
<style>
    .am-btn {
        display: inline-block;
        margin-bottom: 0;
        padding: 5px 10px;
        font-size: 14px;
        font-weight: 400;
        line-height: 1.2;
        text-align: center;
        white-space: nowrap;
        background-image: none;
        border: 1px solid transparent;
        border-radius: 0;
        cursor: pointer;
        outline: 0;
        -webkit-appearance: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        -webkit-transition: background-color .3s ease-out,border-color .3s ease-out;
        transition: background-color .3s ease-out,border-color .3s ease-out;
    }
    .am-form-file {
        position: relative;
        overflow: hidden;
    }
    .am-btn-danger {
        color: #fff;
        background-color: #fc9733;
        border-color: #fc9733;
    }
    .am-form-file input[type=file] {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 1;
        width: 100%;
        opacity: 0;
        cursor: pointer;
        font-size: 50rem;
    }
</style>
<form method="post" enctype="multipart/form-data"
      action="{php echo $this->createMobileUrl('addstore', array('op' => 'post', 'storeid' => $storeid), true)}">
    <input type="hidden" name="token" value="{$_W['token']}" />
    <input type="hidden" name="id" value="{$id}" />
    <input type="hidden" name="marketingid" value="{$marketingid}" />
<div id="wrap">
    <header class="bar bar-nav">
        <a class="button button-link button-nav pull-left" href="{php echo $this->createMobileUrl('admingoods', array('storeid'=>$storeid, 'cid' => $cid), true);}"><span class="icon-left"></span></a>
        <h1 class="title">商家申请</h1>
    </header>
    <div class="content">
        <div class="list-block address-editor">
            <ul class="full-width-form">
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">门店名称:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入您的门店名称" name="title" id="title" value="{$item['title']}">
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">门店简介:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入门店简介" name="info" id="info"
                                   value="{$item['info']}">
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">联系电话:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入联系电话" name="tel" id="tel" value="{$item['tel']}">
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">联系地址:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入联系地址" name="address" id="address" value="{$item['address']}">
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">门店logo:</div>
                        <div class="item-input" style="padding-right:30px; line-height:21px;">
                            <div class="am-form-group am-form-file">
                                <button type="button" class="am-btn am-btn-danger am-btn-sm"> <i
                                        class="am-icon-cloud-upload"></i> 选择门店logo</button>
                                <input id="erweima" type="file" name="thumb">
                                {if $item['thumb']}
                                <img style="max-height:32px;" src="{php echo tomedia($item['thumb']);}">
                                {/if}
                            </div>
                            <div id="file-list"></div>
                            <script>
                                $(function() {
                                    $('#erweima').on('change', function() {
                                        var fileNames = '';
                                        $.each(this.files, function() {
                                            fileNames += '<span class="am-badge">' + this.name + '</span> ';
                                        });
                                        $('#file-list').html(fileNames);
                                    });
                                });
                            </script>
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">门店类型:</div>
                        <div class="item-input">
                            <select name="type" id="type">
                                <option value="0">请选择类别</option>
                                {loop $shoptype $row}
                                <option value="{$row['id']}" {if $row['id'] == $item['typeid']} selected="selected"{/if}>{$row['name']}</option>
                                {/loop}
                            </select>
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">所属区域:</div>
                        <div class="item-input">
                            <select name="area" id="area">
                                <option value="0">请选择区域</option>
                                {loop $area $row}
                                <option value="{$row['id']}" {if $row['id'] == $item['areaid']} selected="selected"{/if}>{$row['name']}</option>
                                {/loop}
                            </select>
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">登陆账号:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入登陆账号" name="username" id="username"
                                   value="{$item['username']}">
                        </div>
                    </div>
                </li>
                <li class="item-content">
                    <div class="item-inner">
                        <div class="item-title label">登陆密码:</div>
                        <div class="item-input">
                            <input type="text" placeholder="请输入登陆密码" name="password" id="password"
                                   value="{$item['password']}">
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
</div>
<nav class="bar bar-tab">
    <div align="center" style="margin-bottom: 50px;" class="button button-fill delivery-button-submit">
        <button type="submit" name="submit" value="submit" class="am-btn am-btn-success am-radius" style="color:#fff;">确认提交</button>
    </div>
    <!--<a href="#" class="button button-fill delivery-button-submit" id="btnselect">-->
        <!--确认提交-->
    <!--</a>-->
</nav>
</form>
<div class="popup-overlay"></div>
</body>
</html>
